The present invention relates to a compressing and coding apparatus for a video signal.
As a method for coding a video signal, a interframe coding method, for example, is well known. With this method, good efficiency is available, i.e., a high compression ratio and good picture quality, when a video signal to be coded is relatively stationary. However, the interframe coding method is disadvantageous in that the coding efficiency is decreased when greater portions of the video signal represent large moving objects or a quick or sudden movement. In order to overcome these disadvantages, there has been proposed a movement-compensated predictive coding that is able to code the video signal corresponding to the moving portion with a high efficiency.
Such movement-compensated predictive coding is basically classified into two types. In one type, a movement in the input video signal to be coded is detected pixel-by-pixel by using each coded picture element. In the other type, the movement is detected block-by-block, each block comprising a plurality of picture elements. The movement-compensated predictive coding based on the block-by-block sub-division method is disclosed, for example, in U.S. Pat. No. 4,371,895. According to the disclosure of the above patent, the movement-compensated predictive coding is performed in such a manner that, an evaluation value is obtained by detecting similarities between a television signal in one movement detection block of a current frame and television signals in movement detection blocks of a previous frame. The detection is carried out as positions of the blocks of the previous frame are shifted by various amounts (referred to as trial vectors), and while the television signal in the movement detection block of the previous frame having the maximum degree of similarity is used for a prediction signal for the movement detection block of the current frame.
In a movement-compensated predictive coding apparatus based on the block-by-block method an input video signal is pre-scan converted in accordance with the arrangement of blocks, each of which is used for movement detection, such that the time sequence of the input video signal complies with that of the blocks. Such pre-scan conversion leads to an advantage that sequential processing for each picture element for coding matches sequential processing of the blocks for detecting the movement. That is, the data associated with each block is arranged in an order which facilitates the processing of the data.
However, the pre-scan converting of the input video signal at the beginning to detect the movement leads to the following disadvantage. To detect movement, it is required to compare a signal of some block with a signal having one frame time difference in a corresponding surrounding region. Simultaneously, it is also required to change the data (write) of a region of subsequent several lines in preparation for the next movement detection. At this time, if the number of lines permitting movement compensation is not an integer times the number of lines included in one block, this creates a memory area in which signal information written therein is not used for detecting movement. Consequently, that memory area becomes useless. In order to avoid the above disadvantage, the area for which movement compensation is provided must be set to a size of an integer times the size of one block. The foregoing disadvantage will be described later in greater detail.